<?php
$this->pageTitle = Yii::app()->name . ' - Black or White';
?>

<script type="text/javascript">
var _timeStamp=1329929385;
var siteurl="<?php echo Yii::app()->request->baseUrl;?>/index.php/game/";
</script>
<div class="wrapper" style="padding: 10px;">
	<div id="row1" class="col4 marg_right1">
		<h2>Game: Black or White (x1.9)</h2>
		<?php if(isset($rule)){echo $rule['value'];}?>
		<div>
			<center>
				<h3>
					<span id="error" class="green">Loading.........</span>
				</h3>
			</center>
		</div>
		<div class="bwblack">
			<img src="<?php echo Yii::app()->request->baseUrl;?>/images/game_bw/black.jpg"><br> <br>
			<center>
			<?php $i=1; foreach ($bw_money as $bwm):?>
				<input type="button"
					onclick="playbw('black','<?php echo $bwm['money'];?>');"
					class="bwbutton" value="<?php echo $bwm['money'] . '$';?>" />
					<?php if($i==3){echo '<br/>'; $i=1;}else{$i++;}?>
					<?php endforeach;?>
			</center>
		</div>
		<div class="bm" id="ccxx"></div>
		<div class="bwwhite">
			<img src="<?php echo Yii::app()->request->baseUrl;?>/images/game_bw/white.jpg"><br> <br>
			<center>
			<?php $i=1; foreach ($bw_money as $bwm):?>
				<input type="button"
					onclick="playbw('white','<?php echo $bwm['money'];?>');"
					class="bwbutton" value="<?php echo $bwm['money'] . '$';?>" />
					<?php if($i==3){echo '<br/>'; $i=1;}else{$i++;}?>
					<?php endforeach;?>
			</center>
		</div>
		<br clear="all">
		<br/>
		<div id="his">Logs</div>
		<script>
				$.post(siteurl+"play/", { type:"loadbwhis"} ,
				function(data){						
				$("#his").html(data);				
			});
		</script>
	</div>
</div>
